<%--
  Created by IntelliJ IDEA.
  User: ThinkPad
  Date: 2021/12/23
  Time: 11:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" import="domain.User" isELIgnored="false"%>
<html>
<body>
<div style="text-align: right;margin-right: 100px">
    <%
        User user = (User) session.getAttribute("user");
        if (user == null){
    %>
    您还没登录呐~  <a href="${pageContext.request.contextPath}/login.jsp">登录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/register.jsp">注册</a>
    <%
        }else {
    %>
    欢迎您，<%=user.getUsername()%>&nbsp;&nbsp;|&nbsp;&nbsp;
    <a href="${pageContext.request.contextPath}/logout.jsp">注销</a>
    <%
        }
    %>
</div>
<br />
<a href="main.jsp"><strong style="margin-left: 50px;color: gold;font-size: xx-large">小汉堡</strong></a>
<br /><br />
<hr />
<br />
</body>
</html>
